﻿<controls:ChildWindow x:Class="LEEAAttendanceControl.Views.LocationEdit"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="398" Height="258">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0" Margin="15" HorizontalAlignment="Center" DataContext="{Binding}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <sdk:Label Content="Location Name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3"
                       VerticalAlignment="Center"/>
            
            <TextBox x:Name="NameBox" Width="150" Grid.Column="1" Grid.Row="0" Margin="3" HorizontalAlignment="Left"
                     Text="{Binding Name, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
                     Background="#FFD4E515"/>

            <sdk:Label Content="Devices:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3"
                       VerticalAlignment="Center"/>
            <ComboBox x:Name="cboDevices" Grid.Column="1" Grid.Row="1" Height="23" DisplayMemberPath="DeviceId" SelectedValuePath="DeviceId" SelectedValue="{Binding DeviceId,Mode=TwoWay,ValidatesOnExceptions=True,NotifyOnValidationError=True}"   HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top" Width="150" />
            <Button x:Name="SaveButton" Grid.Row="2" Content="Save" Width="65" Height="25" HorizontalAlignment="Left" Click="SaveButton_Click" Grid.Column="1" Margin="0,10,0,0" />
        
        </Grid>
        
        
        <sdk:ValidationSummary x:Name="ErrorSummary" Grid.Row="2" Margin="0,19,0,48" Height="72"/>
    </Grid>
</controls:ChildWindow>